<?php 
/*
**模型：附件
**model/class.attachment.php
**By QINIAO
*/

class qiAttachment{
	var $db;
	
	function qiAttachment($dbhandle)
	{
		$this->db = $dbhandle;
	}
	//获取指定微博的图片
    function getMlogPic($aid)
	{
	$res = $this->db->query("select * from ".DB_PREFIX."attachment where id=$aid");
	$row = $this->db->fetch_array($res);
	if($row)
	{
	$picDate = array(
	'id' => $row['id'],
	'cid' => $row['cid'],
	'uid' => $row['uid'],
	'filepath' => $row['filepath'],
	'cTime' => $row['cTime']
	);
	return $picDate;
	}
	}
	
	}

?>